package storeModel

import (
	"gitee.com/libwiki/lib-mall/models"
	"gitee.com/libwiki/lib-mall/package/vars"
)

type Store struct {
	Code         string        `json:"code" gorm:"type:varchar(64);comment:门店唯一code"`
	Name         string        `json:"name" gorm:"comment:门店名称"`
	Desc         string        `json:"desc" gorm:"comment:门店简介"`
	Lat          float64       `json:"lat" gorm:"type:decimal(12,8);comment:现实店纬度"`
	Lng          float64       `json:"lng" gorm:"type:decimal(12,8);comment:现实店经度"`
	Address      string        `json:"address" gorm:"comment:现实店具体地址"`
	Phone        string        `json:"phone" gorm:"type:char(11);comment:联系电话"`
	PhoneArea    int           `json:"phone_area" gorm:"type:char(11);comment:联系电话区号"`
	ContactsName string        `json:"contacts_name" gorm:"type:varchar(32);comment:联系人"`
	Avatar       string        `json:"avatar" gorm:"comment:门店封面图"`
	AdvertImages []byte        `json:"advert_images" gorm:"comment:宣传图（多张）"`
	Status       bool          `json:"status" gorm:"default:1;comment:启用、禁用状态"`
	Uid          uint          `json:"uid" gorm:"comment:门店所属用户"`
	Type         vars.Enum     `json:"type" gorm:"default:reality;type:enum('virtual','reality');comment:虚拟店、实体店"`
	AuditStatus  vars.Enum     `json:"audit_status" gorm:"default:wait;type:enum('wait','success','fail');comment:审核状态"`
	AuditTime    vars.Datetime `json:"audit_time" gorm:"comment:审核时间"`

	models.BaseModel
	models.DeleteField
}
